<script setup lang="ts">
import { addDialog } from "@/components/ReDialog";
import { useColumns } from "./columns";
import form from '../from.vue'
const { columns, dataList } = useColumns();
function onFormOneClick() {
  addDialog({
    width: "500px",
    title: "新增脚本",
    contentRenderer: () => form,
    props: {
      // 赋默认值
      formInline: {

      }
    },
    closeCallBack: ({ options, args }) => {
      // options.props 是响应式的

    }
  });
}

</script>

<template>
  <div class="flex">
    <el-card wdith="100%" class="w-full">
      <el-button class="mb-3" type="primary" @click="onFormOneClick">新增</el-button>
      <pure-table class="w-full" row-key="id" border :data="dataList" :columns="columns" />
    </el-card>
  </div>
</template>
